﻿using System;
using System.Windows.Forms;

namespace _6.jkxt
{
    public partial class xlJs : Form
    {
        public xlJs()
        {
            InitializeComponent();
        }

        private void xlJs_Load(object sender, EventArgs e)
        {
            str66.Text = "10ms";
        }
        public string[] str = new string[8];
        public string[] Str
        {
            get { return this.str; }
        }
        private void btn_Click(object sender, EventArgs e)
        {
            if (str1.Text != "" && str2.Text != "" && str3.Text != "" && str7.Text != "")
            {
                str[0] = str1.Text.Trim();
                str[1] = str2.Text.Trim();
                str[2] = str3.Text.Trim();
                str[3] = str4.Text;
                str[4] = str5.Text;
                str[5] = str66.Text;
                str[6] = str7.Text;
                switch (str[5])
                {
                    case "1ms":
                        str[7] = "1";
                        break;
                    case "10ms":
                        str[7] = "10";
                        break;
                    case "100ms":
                        str[7] = "100";
                        break;
                    case "1s":
                        str[7] = "1000";
                        break;
                    case "30s":
                        str[7] = "30000";
                        break;
                    case "1min":
                        str[7] = "60000";
                        break;

                }
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                if (str1.Text == "") { label8.Visible = true; } else { label8.Visible = false; }
                if (str2.Text == "") { label9.Visible = true; } else { label9.Visible = false; }
                if (str3.Text == "") { label10.Visible = true; } else { label10.Visible = false; }
                if (str7.Text == "") { label11.Visible = true; } else { label11.Visible = false; }
            }
        }
        private void textBox1_Click(object sender, EventArgs e)
        {
            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                str7.Text = folderBrowserDialog1.SelectedPath;
            }
        }
    }
}
